價格:免費
更新日期:2019-06-01
檔案大小:5.5M
目前版本:1.0.2
版本需求:Android 4.4 以上版本
官方網站:https://www.nextlabs.cc/
Email:nextlabs.cc@gmail.com
聯絡地址:No 905, Jalan Melor 2, Taman Tangkak Jaya, 84900 Tangkak, Johor, Malaysia.
The Swift Programming Language Documentation version 5.0
Swift is a general-purpose programming language built using a modern approach to safety, performance, and software design patterns.
The goal of the Swift project is to create the best available language for uses ranging from systems programming, to mobile and desktop apps, scaling up to cloud services. Most importantly, Swift is designed to make writing and maintaining correct programs easier for the developer. To achieve this goal, we believe that the most obvious way to write Swift code must also be:
Safe. The most obvious way to write code should also behave in a safe manner. Undefined behavior is the enemy of safety, and developer mistakes should be caught before software is in production. Opting for safety sometimes means Swift will feel strict, but we believe that clarity saves time in the long run.
Fast. Swift is intended as a replacement for C-based languages (C, C++, and Objective-C). As such, Swift must be comparable to those languages in performance for most tasks. Performance must also be predictable and consistent, not just fast in short bursts that require clean-up later. There are lots of languages with novel features — being fast is rare.
Expressive. Swift benefits from decades of advancement in computer science to offer syntax that is a joy to use, with modern features developers expect. But Swift is never done. We will monitor language advancements and embrace what works, continually evolving to make Swift even better.
Tools are a critical part of the Swift ecosystem. We strive to integrate well within a developer’s toolset, to build quickly, to present excellent diagnostics, and to enable interactive development experiences. Tools can make programming so much more powerful, like Swift-based playgrounds do in Xcode, or a web-based REPL can when working with Linux server-side code.
Table of Content
About Swift
Version Compatibility
A Swift Tour
The Basics
Basic Operators
Strings and Characters
Collection Types
Control Flow
Functions
Closures
Enumerations
Structures and Classes
Properties
Methods
Subscripts
Inheritance
Initialization
Deinitialization
Optional Chaining
Error Handling
Type Casting
Nested Types
Extensions
Protocols
Generics
Automatic Reference Counting
Memory Safety
Access Control
Advanced Operators
About the Language Reference
Lexical Structure
Types
Expressions
Statements
Declarations
Attributes
Patterns
Generic Parameters and Arguments
Summary of the Grammar
Document Revision History